package com.chuangke.mds.entity;

import java.util.Date;
import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chuangke.admin.data.builder.UserDataBuilder;
import com.chuangke.common.trans.annotation.Trans;

/**
 * @date : 2025-3-5
 */

@TableName("mds_kb_knowledge")
@Document(indexName = "knowledge_index")
public class Knowledge {

	@Id
	private String id;
	private String sourceType ;
	private String sourceId ;
	private String bisType ;
	private String deptId ;
	private String modelId ;
	private String date;
	@TableField(exist = false)
	private String modelName;
	@TableField(exist = false)
	private String deptName;
	@TableField(exist = false)
	private String categoryName;
	/** 当前版本 */
	private String version;
	/** 标题 */
	@Field(type = FieldType.Text,analyzer = "ik_max_word")
	private String name;
	/** 分类 */
	private String categoryId;
	/** 主题 */
	private String themeId;
	/** 简介 */
	private String synopsis;
	/** 正文 */
	@Field(type = FieldType.Text,analyzer = "ik_max_word")
	private String bodyContent;
	/** 扩展字段1 */
	private String col1 ;
	/** 扩展字段2 */
	private String col2 ;
	/** 扩展字段3 */
	private String col3 ;
	/** 扩展字段4 */
	private String col4 ;
	/** 扩展字段5 */
	private String col5 ;
	/** 扩展字段6 */
	private String col6 ;
	/** 扩展字段7 */
	private String col7 ;
	/** 扩展字段8 */
	private String col8 ;
	/** 扩展字段9 */
	private String col9 ;
	/** 状态 */
	private String status ;
	/** 创建时间 */
	private Date creationDate;
	/** 最后修改时间 */
	private Date lastUpdateDate;
	/** 最后修改人 */
	private String lastUpdateBy;
	/** 最后更新ip */
	private Date lastUpdateIp;
	/** 组织标识 */
	private String orgIdentity;
	/** 标签（格式：标签code1|标签code2|标签code3|） */
	private String labels;
	@TableField(exist = false)
	private String labelNames;
	//阅读次数
	private int readingTimes;
	
	private String remarks;
	private String classification;//密级
	@TableField(fill = FieldFill.INSERT) private Date createdAt;
	@Trans(dataBuilder=UserDataBuilder.class,key="createdBy",ref="createdByName")
	@TableField(fill = FieldFill.INSERT) private String createdBy;
	@TableField(fill = FieldFill.INSERT_UPDATE) private Date updatedAt;
	@Trans(dataBuilder=UserDataBuilder.class,key="updatedBy",ref="updatedByName")
	@TableField(fill = FieldFill.INSERT_UPDATE) private String updatedBy;
	@TableField(exist=false) private String createdByName;
	@TableField(exist=false) private String updatedByName;
	

	@TableField(exist=false) private String content;
	@TableField(exist=false) private List<KnowledgeAffix> affixList;
	@TableField(exist=false) private List<KnowledgeModelProperty> modelPropertyList;

	
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSourceType() {
		return sourceType;
	}

	public void setSourceType(String sourceType) {
		this.sourceType = sourceType;
	}

	public String getSourceId() {
		return sourceId;
	}

	public void setSourceId(String sourceId) {
		this.sourceId = sourceId;
	}

	public String getBisType() {
		return bisType;
	}

	public void setBisType(String bisType) {
		this.bisType = bisType;
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	public String getThemeId() {
		return themeId;
	}

	public void setThemeId(String themeId) {
		this.themeId = themeId;
	}

	public String getSynopsis() {
		return synopsis;
	}

	public void setSynopsis(String synopsis) {
		this.synopsis = synopsis;
	}

	public String getBodyContent() {
		return bodyContent;
	}

	public void setBodyContent(String bodyContent) {
		this.bodyContent = bodyContent;
	}

	public String getCol1() {
		return col1;
	}

	public void setCol1(String col1) {
		this.col1 = col1;
	}

	public String getCol2() {
		return col2;
	}

	public void setCol2(String col2) {
		this.col2 = col2;
	}

	public String getCol3() {
		return col3;
	}

	public void setCol3(String col3) {
		this.col3 = col3;
	}

	public String getCol4() {
		return col4;
	}

	public void setCol4(String col4) {
		this.col4 = col4;
	}

	public String getCol5() {
		return col5;
	}

	public void setCol5(String col5) {
		this.col5 = col5;
	}

	public String getCol6() {
		return col6;
	}

	public void setCol6(String col6) {
		this.col6 = col6;
	}

	public String getCol7() {
		return col7;
	}

	public void setCol7(String col7) {
		this.col7 = col7;
	}

	public String getCol8() {
		return col8;
	}

	public void setCol8(String col8) {
		this.col8 = col8;
	}

	public String getCol9() {
		return col9;
	}

	public void setCol9(String col9) {
		this.col9 = col9;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public Date getLastUpdateDate() {
		return lastUpdateDate;
	}

	public void setLastUpdateDate(Date lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}

	public String getLastUpdateBy() {
		return lastUpdateBy;
	}

	public void setLastUpdateBy(String lastUpdateBy) {
		this.lastUpdateBy = lastUpdateBy;
	}

	public Date getLastUpdateIp() {
		return lastUpdateIp;
	}

	public void setLastUpdateIp(Date lastUpdateIp) {
		this.lastUpdateIp = lastUpdateIp;
	}

	public String getOrgIdentity() {
		return orgIdentity;
	}

	public void setOrgIdentity(String orgIdentity) {
		this.orgIdentity = orgIdentity;
	}

	public List<KnowledgeAffix> getAffixList() {
		return affixList;
	}

	public void setAffixList(List<KnowledgeAffix> affixList) {
		this.affixList = affixList;
	}

	public List<KnowledgeModelProperty> getModelPropertyList() {
		return modelPropertyList;
	}

	public void setModelPropertyList(List<KnowledgeModelProperty> modelPropertyList) {
		this.modelPropertyList = modelPropertyList;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	public String getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}

	public String getCreatedByName() {
		return createdByName;
	}

	public void setCreatedByName(String createdByName) {
		this.createdByName = createdByName;
	}

	public String getUpdatedByName() {
		return updatedByName;
	}

	public void setUpdatedByName(String updatedByName) {
		this.updatedByName = updatedByName;
	}

	public String getClassification() {
		return classification;
	}

	public void setClassification(String classification) {
		this.classification = classification;
	}

	public String getModelId() {
		return modelId;
	}

	public void setModelId(String modelId) {
		this.modelId = modelId;
	}

	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getLabels() {
		return labels;
	}

	public void setLabels(String labels) {
		this.labels = labels;
	}

	public String getLabelNames() {
		return labelNames;
	}

	public void setLabelNames(String labelNames) {
		this.labelNames = labelNames;
	}

	public int getReadingTimes() {
		return readingTimes;
	}

	public void setReadingTimes(int readingTimes) {
		this.readingTimes = readingTimes;
	}
}